<?php
include_once "src/controller/dbmanagement/ReportDBManagement.php";

/**
 * Display Reports that shows the use of Reources for a specified period
 *
 * @author: Ngozi Ihemelandu
 */
class ReportManagement
{
/**
 * This report shows the frequency of use of the Resources By Users over a
 * specified period of time
 *
 *Precondition:  Accepts two (2) variables for a specified period.
 *Format for mysql Date is (YYYY/MM/DD)
 *
 *Postcondition: Returns a multidimensional Array that shows the:
 *                  Resource
 *                  Frequency Of Use
 *                  Resource Owner
 *               Otherwise returns False.
 **/
    public static function RptResourcesByUsers($startPeriod, $endPeriod)
    {
        try {

            return ReportDBManagement::RptResourceUsedByUsersInPeriod($startPeriod, $endPeriod);

        } catch (DBException $e) {
            throw $e;
        } catch (DBConnectionException $e) {
            throw $e;
        }

    }

    public static function RptResourcesByUsers2($startPeriod, $endPeriod)
    {
        try {

            return ReportDBManagement::RptResourceUsedByUsersInPeriod2($startPeriod, $endPeriod);

        } catch (DBException $e) {
            throw $e;
        } catch (DBConnectionException $e) {
            throw $e;
        }

    }

 /**
  * This report shows the frequency of use of the Resources over a
  * specified period of time
  *
  *Precondition:  Accepts two (2) variables for a specified period.
  *Format for mysql Date is (YYYY/MM/DD)
  *
  *Postcondition: Returns a multidimensional Array that shows the:
  *                  Resource
  *                  Frequency Of Use
  *                  Resource Owner
  *               Otherwise returns False.
  **/
    public static function RptResourcesforPeriod($startPeriod, $endPeriod)
    {
        try {

            return ReportDBManagement::RptResourceUsedInPeriod($startPeriod, $endPeriod);

        } catch (DBException $e) {
            throw $e;
        } catch (DBConnectionException $e) {
            throw $e;
        }

    }

}
?>
